import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
//引入字体文件
import './assets/font/iconfont.css'

//引入全局样式文件
import './assets/css/global.less'

import SocketService from '@/utils/socket_service'
//对服务端进行websocket连接
SocketService.Instance.connect();

//将自定义的SocketService挂载到vue原型对象上,方便组件调用
Vue.prototype.$socket = SocketService.Instance;

//配置请求基准路径
axios.defaults.baseURL = 'http://127.0.0.1:3000/api/'

//将axios挂载到Vue的原型对象上
Vue.prototype.$http = axios

//将全局echarts对象挂载到Vue原型对象上
Vue.prototype.$echarts = window.echarts

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')